package flect.demo1;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class Test {
	public static void main(String[] args) throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
		Constructor<String> constructor = String.class.getConstructor(String.class);
		String newInstance = constructor.newInstance("55455");
		System.out.println(newInstance);
	}
}
class Parent{
	
}
class Child extends Parent{
	
}
class Main{
	/*public void add(Class<Child> cl) {
		System.out.println(cl);
	}
	public void add(Class<Parent> pr) {
		System.out.println(pr);
	}*/
}
